<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>EXE Components Demo</title>
    <link rel="stylesheet" href="./testAssets/highlight/styles/github-dark.min.css">
    <script src="./testAssets/highlight/highlight.min.js"></script>
    <script src="./testAssets/jquery-3.6.0.min.js"></script>
    <script src="./demo.js"></script>
    <script src="./exe-components.js"></script>
    <style>
        body {
            position: relative;
        }
        .page-title {
            font-size: 30px;
            border-bottom: 1px solid #eee;
            padding: 12px 0;
        }
        .medal-item img{
            width: 16px;
            height: 16px;
        }
        .demo-item {
            width: 340px;
            height: 280px;
            padding: 16px;
            text-decoration: none;
            display: inline-block;
            margin: 16px;
            transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
            cursor: pointer;
            overflow: auto;
            border-radius: 3px;
            box-shadow: 0 10px 40px -10px rgb(0 64 128 / 20%);
            position: relative;
            top: 0;
        }
        .demo-item:hover {
            box-shadow: 0 10px 40px -10px rgb(0 64 128 / 40%);
            top: -2px;
        }
        .demo-title {
            font-size: 18px;
            font-weight: bold;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
        }
        .demo-code-title {
            font-size: 14px;
            margin-top: 6px;
        }
        .demo-icon {
            width: 8px;
            height: 8px;
            display: inline-block;
            border-radius: 50%;
            margin-right: 6px;
            background-color: #2E94B9;
        }
        pre {
            margin-top: 6px;
        }
        pre code {
            overflow: auto;
            cursor: text;
        }
        .fixed-content {
            position: fixed;
            background: #fff;
            width: 480px;
            height: 400px;
            border: 2px solid #eee;
            z-index: 999;
            top: 0;
            bottom: 0;
            left: 0;
            right: 0;
            margin: auto;
        }
        .open-full, .close-full {
            width: 18px;
            height: 18px;
            position: absolute;
            right: 16px;
        }
        .close-full {
            display: none;
        }

    </style>
</head>
<body>
    <div class="page-title">🔥EXE Components 组件库演示</div>
    <div id="root"></div>

    <script>
        // 卡片弹框
        const showFixedCard = elem => {
            console.log(elem)
            $(elem).toggleClass('fixed-content');
            $(elem + ' .open-full').toggle();
            $(elem + ' .close-full').toggle();
        }

        // 默认事件
        const avatarClick = () => alert("点击头像及空白区域");
        const buttonClick = () => alert("点击关注按钮");

        // 复杂业务示例：用户列表
        const toUserHome = url => window.open(url, '_blank');
        const toUserFollow = name => alert(`您已成功关注「${name}」，快去看看吧`);
    </script>
<script>
</script>
</body>
</html>